<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>单击段落、变颜色</title>
    <script type="text/javascript">
        function changecolor() {
            document.getElementById('p1').style.color='red'
        }
        function resetcolor() {
            document.getElementById('p1').style.color='#0099FF'
        }
    </script>
</head>
<body>
<p id="p1" style="color:#0099FF;">这是一个段落！</p>
<button type="button" onclick="changecolor()">点我改变颜色</button>
<button type="button" onclick="resetcolor()">恢复</button>
</body>
</html>